package com.redare.dev.smart.generator.sdk.pojo.form;

import com.redare.dev.smart.generator.sdk.pojo.OnlFormField;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

;

/**
 * @date 2021-08-28 11:44:05
 * Created by yangqiangyu
 */
public class OnlFormHeadForm {


    public static class Parse{
        /**
         * 系统id
         */
//        @NotNull(message = "系统id不能为空")
        private Long sysId;

        @NotBlank(message = "建表语句不能为空")
        private String sql;

        public Long getSysId() {
            return sysId;
        }

        public Parse setSysId(Long sysId) {
            this.sysId = sysId;
            return this;
        }

        public String getSql() {
            return sql;
        }

        public Parse setSql(String sql) {
            this.sql = sql;
            return this;
        }
    }

    public static class Add {
        /**
         * 系统id
         */
//        @NotNull(message = "系统id不能为空")
        private Long sysId;
        /**
         * 表名
         */
        @NotBlank(message = "表名不能为空")
        private String tableName;
        /**
         * 表类型: 0单表、1主表、2附表
         */
        @NotNull(message = "表类型: 0单表、1主表、2附表不能为空")
        private Integer tableType;
        /**
         * 表版本
         */
        private Integer tableVersion;
        /**
         * 表说明
         */
        @NotBlank(message = "表说明不能为空")
        private String tableTxt;
        /**
         * 是否带checkbox
         */
        @NotBlank(message = "是否带checkbox不能为空")
        private String isCheckbox;
        /**
         * 同步数据库状态
         */
        @NotBlank(message = "同步数据库状态不能为空")
        private String isDbSynch;
        /**
         * 是否分页
         */
        @NotBlank(message = "是否分页不能为空")
        private String isPage;
        /**
         * 是否是树
         */
        @NotBlank(message = "是否是树不能为空")
        private String isTree;
        /**
         * 主键生成序列
         */
        private String idSequence;
        /**
         * 主键类型
         */
        private String idType;
        /**
         * 查询模式
         */
        @NotBlank(message = "查询模式不能为空")
        private String queryMode;
        /**
         * 映射关系 0一对多  1一对一
         */
        private Integer relationType;
        /**
         * 子表
         */
        private String subTableStr;
        /**
         * 附表排序序号
         */
        private Integer tabOrderNum;
        /**
         * 树形表单父id
         */
        private String treeParentIdField;
        /**
         * 树表主键字段
         */
        private String treeIdField;
        /**
         * 树开表单列字段
         */
        private String treeFieldname;
        /**
         * 表单分类
         */
        @NotBlank(message = "表单分类不能为空")
        private String formCategory;
        /**
         * PC表单模板
         */
        private String formTemplate;
        /**
         * 表单模板样式(移动端)
         */
        private String formTemplateMobile;
        /**
         * 是否有横向滚动条
         */
        private Integer scroll;
        /**
         * 复制版本号
         */
        private Integer copyVersion;
        /**
         * 复制表类型1为复制表 0为原始表
         */
        private Integer copyType;
        /**
         * 原始表ID
         */
        private String physicId;
        /**
         * 扩展JSON
         */
        private String extConfigJson;
        /**
         * 修改人
         */
        private String updateBy;
        /**
         * 修改时间
         */
        private Date updateTime;
        /**
         * 创建人
         */
        private String createBy;
        /**
         * 创建时间
         */
        private Date createTime;
        /**
         * 主题模板
         */
        private String themeTemplate;
        /**
         * 是否用设计器表单
         */
        private String isDesForm;
        /**
         * 设计器表单编码
         */
        private String desFormCode;

        public Long getSysId() {
            return sysId;
        }

        public Add setSysId(Long sysId) {
            this.sysId = sysId;
            return this;
        }


        public String getTableName() {
            return tableName;
        }

        public Add setTableName(String tableName) {
            this.tableName = tableName;
            return this;
        }


        public Integer getTableType() {
            return tableType;
        }

        public Add setTableType(Integer tableType) {
            this.tableType = tableType;
            return this;
        }


        public Integer getTableVersion() {
            return tableVersion;
        }

        public Add setTableVersion(Integer tableVersion) {
            this.tableVersion = tableVersion;
            return this;
        }


        public String getTableTxt() {
            return tableTxt;
        }

        public Add setTableTxt(String tableTxt) {
            this.tableTxt = tableTxt;
            return this;
        }


        public String getIsCheckbox() {
            return isCheckbox;
        }

        public Add setIsCheckbox(String isCheckbox) {
            this.isCheckbox = isCheckbox;
            return this;
        }


        public String getIsDbSynch() {
            return isDbSynch;
        }

        public Add setIsDbSynch(String isDbSynch) {
            this.isDbSynch = isDbSynch;
            return this;
        }


        public String getIsPage() {
            return isPage;
        }

        public Add setIsPage(String isPage) {
            this.isPage = isPage;
            return this;
        }


        public String getIsTree() {
            return isTree;
        }

        public Add setIsTree(String isTree) {
            this.isTree = isTree;
            return this;
        }


        public String getIdSequence() {
            return idSequence;
        }

        public Add setIdSequence(String idSequence) {
            this.idSequence = idSequence;
            return this;
        }


        public String getIdType() {
            return idType;
        }

        public Add setIdType(String idType) {
            this.idType = idType;
            return this;
        }


        public String getQueryMode() {
            return queryMode;
        }

        public Add setQueryMode(String queryMode) {
            this.queryMode = queryMode;
            return this;
        }


        public Integer getRelationType() {
            return relationType;
        }

        public Add setRelationType(Integer relationType) {
            this.relationType = relationType;
            return this;
        }


        public String getSubTableStr() {
            return subTableStr;
        }

        public Add setSubTableStr(String subTableStr) {
            this.subTableStr = subTableStr;
            return this;
        }


        public Integer getTabOrderNum() {
            return tabOrderNum;
        }

        public Add setTabOrderNum(Integer tabOrderNum) {
            this.tabOrderNum = tabOrderNum;
            return this;
        }


        public String getTreeParentIdField() {
            return treeParentIdField;
        }

        public Add setTreeParentIdField(String treeParentIdField) {
            this.treeParentIdField = treeParentIdField;
            return this;
        }


        public String getTreeIdField() {
            return treeIdField;
        }

        public Add setTreeIdField(String treeIdField) {
            this.treeIdField = treeIdField;
            return this;
        }


        public String getTreeFieldname() {
            return treeFieldname;
        }

        public Add setTreeFieldname(String treeFieldname) {
            this.treeFieldname = treeFieldname;
            return this;
        }


        public String getFormCategory() {
            return formCategory;
        }

        public Add setFormCategory(String formCategory) {
            this.formCategory = formCategory;
            return this;
        }


        public String getFormTemplate() {
            return formTemplate;
        }

        public Add setFormTemplate(String formTemplate) {
            this.formTemplate = formTemplate;
            return this;
        }


        public String getFormTemplateMobile() {
            return formTemplateMobile;
        }

        public Add setFormTemplateMobile(String formTemplateMobile) {
            this.formTemplateMobile = formTemplateMobile;
            return this;
        }


        public Integer getScroll() {
            return scroll;
        }

        public Add setScroll(Integer scroll) {
            this.scroll = scroll;
            return this;
        }


        public Integer getCopyVersion() {
            return copyVersion;
        }

        public Add setCopyVersion(Integer copyVersion) {
            this.copyVersion = copyVersion;
            return this;
        }


        public Integer getCopyType() {
            return copyType;
        }

        public Add setCopyType(Integer copyType) {
            this.copyType = copyType;
            return this;
        }


        public String getPhysicId() {
            return physicId;
        }

        public Add setPhysicId(String physicId) {
            this.physicId = physicId;
            return this;
        }


        public String getExtConfigJson() {
            return extConfigJson;
        }

        public Add setExtConfigJson(String extConfigJson) {
            this.extConfigJson = extConfigJson;
            return this;
        }


        public String getUpdateBy() {
            return updateBy;
        }

        public Add setUpdateBy(String updateBy) {
            this.updateBy = updateBy;
            return this;
        }


        public Date getUpdateTime() {
            return updateTime;
        }

        public Add setUpdateTime(Date updateTime) {
            this.updateTime = updateTime;
            return this;
        }


        public String getCreateBy() {
            return createBy;
        }

        public Add setCreateBy(String createBy) {
            this.createBy = createBy;
            return this;
        }


        public Date getCreateTime() {
            return createTime;
        }

        public Add setCreateTime(Date createTime) {
            this.createTime = createTime;
            return this;
        }


        public String getThemeTemplate() {
            return themeTemplate;
        }

        public Add setThemeTemplate(String themeTemplate) {
            this.themeTemplate = themeTemplate;
            return this;
        }


        public String getIsDesForm() {
            return isDesForm;
        }

        public Add setIsDesForm(String isDesForm) {
            this.isDesForm = isDesForm;
            return this;
        }


        public String getDesFormCode() {
            return desFormCode;
        }

        public Add setDesFormCode(String desFormCode) {
            this.desFormCode = desFormCode;
            return this;
        }


    }

    public static class Edit {

        @NotNull(message = "请传入id")
        private Long id;

        /**
         * 系统id
         */
        private Long sysId;
        /**
         * 表名
         */
        private String tableName;

        private String subPath;

        private String comment;
        /**
         * 表类型: 0单表、1主表、2附表
         */
        private Integer tableType;
        /**
         * 表版本
         */
        private Integer tableVersion;
        /**
         * 表说明
         */
        private String tableTxt;
        /**
         * 是否带checkbox
         */
        private String isCheckbox;
        /**
         * 同步数据库状态
         */
        private String isDbSynch;
        /**
         * 是否分页
         */
        private Boolean page;
        /**
         * 是否是树
         */
        private Boolean tree;
        /**
         * 主键生成序列
         */
        private String idSequence;
        /**
         * 主键类型
         */
        private String idType;
        /**
         * 查询模式
         */
        private String queryMode;
        /**
         * 映射关系 0一对多  1一对一
         */
        private Integer relationType;
        /**
         * 子表
         */
        private String subTableStr;
        /**
         * 附表排序序号
         */
        private Integer tabOrderNum;
        /**
         * 树形表单父id
         */
        private String treeParentIdField;
        /**
         * 树表主键字段
         */
        private String treeIdField;
        /**
         * 树开表单列字段
         */
        private String treeFieldname;
        /**
         * 表单分类
         */
        private String formCategory;
        /**
         * PC表单模板
         */
        private String formTemplate;
        /**
         * 表单模板样式(移动端)
         */
        private String formTemplateMobile;
        /**
         * 是否有横向滚动条
         */
        private Integer scroll;
        /**
         * 复制版本号
         */
        private Integer copyVersion;
        /**
         * 复制表类型1为复制表 0为原始表
         */
        private Integer copyType;

        private Integer formColumnCount;
        /**
         * 原始表ID
         */
        private String physicId;
        /**
         * 扩展JSON
         */
        private String extConfigJson;
        /**
         * 修改人
         */
        private String updateBy;
        /**
         * 修改时间
         */
        private Date updateTime;
        /**
         * 创建人
         */
        private String createBy;
        /**
         * 创建时间
         */
        private Date createTime;
        /**
         * 主题模板
         */
        private String themeTemplate;
        /**
         * 是否用设计器表单
         */
        private String isDesForm;
        /**
         * 设计器表单编码
         */
        private String desFormCode;


        private Boolean modalForm;

        private Boolean imported;

        private Boolean exportExcel;

        private List<OnlFormField> formFields;

        public Long getId() {
            return id;
        }

        public Edit setId(Long id) {
            this.id = id;
            return this;
        }


        public Long getSysId() {
            return sysId;
        }

        public Edit setSysId(Long sysId) {
            this.sysId = sysId;
            return this;
        }

        public String getTableName() {
            return tableName;
        }

        public Edit setTableName(String tableName) {
            this.tableName = tableName;
            return this;
        }

        public String getSubPath() {
            return subPath;
        }

        public Edit setSubPath(String subPath) {
            this.subPath = subPath;
            return this;
        }

        public String getComment() {
            return comment;
        }

        public Edit setComment(String comment) {
            this.comment = comment;
            return this;
        }

        public Integer getTableType() {
            return tableType;
        }

        public Edit setTableType(Integer tableType) {
            this.tableType = tableType;
            return this;
        }

        public Integer getTableVersion() {
            return tableVersion;
        }

        public Edit setTableVersion(Integer tableVersion) {
            this.tableVersion = tableVersion;
            return this;
        }

        public String getTableTxt() {
            return tableTxt;
        }

        public Edit setTableTxt(String tableTxt) {
            this.tableTxt = tableTxt;
            return this;
        }

        public String getIsCheckbox() {
            return isCheckbox;
        }

        public Edit setIsCheckbox(String isCheckbox) {
            this.isCheckbox = isCheckbox;
            return this;
        }

        public String getIsDbSynch() {
            return isDbSynch;
        }

        public Edit setIsDbSynch(String isDbSynch) {
            this.isDbSynch = isDbSynch;
            return this;
        }

        public Boolean getPage() {
            return page;
        }

        public Edit setPage(Boolean page) {
            this.page = page;
            return this;
        }

        public Boolean getTree() {
            return tree;
        }

        public Edit setTree(Boolean tree) {
            this.tree = tree;
            return this;
        }

        public String getIdSequence() {
            return idSequence;
        }

        public Edit setIdSequence(String idSequence) {
            this.idSequence = idSequence;
            return this;
        }

        public String getIdType() {
            return idType;
        }

        public Edit setIdType(String idType) {
            this.idType = idType;
            return this;
        }

        public String getQueryMode() {
            return queryMode;
        }

        public Edit setQueryMode(String queryMode) {
            this.queryMode = queryMode;
            return this;
        }

        public Integer getRelationType() {
            return relationType;
        }

        public Edit setRelationType(Integer relationType) {
            this.relationType = relationType;
            return this;
        }

        public String getSubTableStr() {
            return subTableStr;
        }

        public Edit setSubTableStr(String subTableStr) {
            this.subTableStr = subTableStr;
            return this;
        }

        public Integer getTabOrderNum() {
            return tabOrderNum;
        }

        public Edit setTabOrderNum(Integer tabOrderNum) {
            this.tabOrderNum = tabOrderNum;
            return this;
        }

        public String getTreeParentIdField() {
            return treeParentIdField;
        }

        public Edit setTreeParentIdField(String treeParentIdField) {
            this.treeParentIdField = treeParentIdField;
            return this;
        }

        public String getTreeIdField() {
            return treeIdField;
        }

        public Edit setTreeIdField(String treeIdField) {
            this.treeIdField = treeIdField;
            return this;
        }

        public String getTreeFieldname() {
            return treeFieldname;
        }

        public Edit setTreeFieldname(String treeFieldname) {
            this.treeFieldname = treeFieldname;
            return this;
        }

        public String getFormCategory() {
            return formCategory;
        }

        public Edit setFormCategory(String formCategory) {
            this.formCategory = formCategory;
            return this;
        }

        public String getFormTemplate() {
            return formTemplate;
        }

        public Edit setFormTemplate(String formTemplate) {
            this.formTemplate = formTemplate;
            return this;
        }

        public String getFormTemplateMobile() {
            return formTemplateMobile;
        }

        public Edit setFormTemplateMobile(String formTemplateMobile) {
            this.formTemplateMobile = formTemplateMobile;
            return this;
        }

        public Integer getScroll() {
            return scroll;
        }

        public Edit setScroll(Integer scroll) {
            this.scroll = scroll;
            return this;
        }

        public Integer getCopyVersion() {
            return copyVersion;
        }

        public Edit setCopyVersion(Integer copyVersion) {
            this.copyVersion = copyVersion;
            return this;
        }

        public Integer getCopyType() {
            return copyType;
        }

        public Edit setCopyType(Integer copyType) {
            this.copyType = copyType;
            return this;
        }

        public Integer getFormColumnCount() {
            return formColumnCount;
        }

        public Edit setFormColumnCount(Integer formColumnCount) {
            this.formColumnCount = formColumnCount;
            return this;
        }

        public String getPhysicId() {
            return physicId;
        }

        public Edit setPhysicId(String physicId) {
            this.physicId = physicId;
            return this;
        }

        public String getExtConfigJson() {
            return extConfigJson;
        }

        public Edit setExtConfigJson(String extConfigJson) {
            this.extConfigJson = extConfigJson;
            return this;
        }

        public String getUpdateBy() {
            return updateBy;
        }

        public Edit setUpdateBy(String updateBy) {
            this.updateBy = updateBy;
            return this;
        }

        public Date getUpdateTime() {
            return updateTime;
        }

        public Edit setUpdateTime(Date updateTime) {
            this.updateTime = updateTime;
            return this;
        }

        public String getCreateBy() {
            return createBy;
        }

        public Edit setCreateBy(String createBy) {
            this.createBy = createBy;
            return this;
        }

        public Date getCreateTime() {
            return createTime;
        }

        public Edit setCreateTime(Date createTime) {
            this.createTime = createTime;
            return this;
        }

        public String getThemeTemplate() {
            return themeTemplate;
        }

        public Edit setThemeTemplate(String themeTemplate) {
            this.themeTemplate = themeTemplate;
            return this;
        }

        public String getIsDesForm() {
            return isDesForm;
        }

        public Edit setIsDesForm(String isDesForm) {
            this.isDesForm = isDesForm;
            return this;
        }

        public String getDesFormCode() {
            return desFormCode;
        }

        public Edit setDesFormCode(String desFormCode) {
            this.desFormCode = desFormCode;
            return this;
        }

        public List<OnlFormField> getFormFields() {
            return formFields;
        }

        public Edit setFormFields(List<OnlFormField> formFields) {
            this.formFields = formFields;
            return this;
        }

        public Boolean getModalForm() {
            return modalForm;
        }

        public Edit setModalForm(Boolean modalForm) {
            this.modalForm = modalForm;
            return this;
        }

        public Boolean getImported() {
            return imported;
        }

        public Edit setImported(Boolean imported) {
            this.imported = imported;
            return this;
        }

        public Boolean getExportExcel() {
            return exportExcel;
        }

        public Edit setExportExcel(Boolean exportExcel) {
            this.exportExcel = exportExcel;
            return this;
        }
    }

    public static class Search {

        private String queryFields;

        private String tableName;

        private List<String> tableNames;

        private String key;

        /**
         * 系统id
         */
        private Long sysId;
        /**
         * 表类型: 0单表、1主表、2附表
         */
        private Integer tableType;

        private boolean includeFields;

        public String getKey() {
            return key;
        }

        public Search setKey(String key) {
            this.key = key;
            return this;
        }

        public String getQueryFields() {
            return queryFields;
        }

        public Search setQueryFields(String queryFields) {
            this.queryFields = queryFields;
            return this;
        }

        public String getTableName() {
            return tableName;
        }

        public Search setTableName(String tableName) {
            this.tableName = tableName;
            return this;
        }

        public List<String> getTableNames() {
            return tableNames;
        }

        public Search setTableNames(List<String> tableNames) {
            this.tableNames = tableNames;
            return this;
        }

        public Long getSysId() {
            return sysId;
        }

        public Search setSysId(Long sysId) {
            this.sysId = sysId;
            return this;
        }


        public Integer getTableType() {
            return tableType;
        }

        public Search setTableType(Integer tableType) {
            this.tableType = tableType;
            return this;
        }


        public boolean isIncludeFields() {
            return includeFields;
        }

        public Search setIncludeFields(boolean includeFields) {
            this.includeFields = includeFields;
            return this;
        }
    }


    public static class Get {
        @NotNull(message = "请传入id")
        private Long id;

        private String tableName;

        private Long tableType;

        private boolean queryField;

        private String queryFields;


        public Long getId() {
            return id;
        }

        public Get setId(Long id) {
            this.id = id;
            return this;
        }

        public String getTableName() {
            return tableName;
        }

        public Get setTableName(String tableName) {
            this.tableName = tableName;
            return this;
        }

        public Long getTableType() {
            return tableType;
        }

        public Get setTableType(Long tableType) {
            this.tableType = tableType;
            return this;
        }

        public boolean isQueryField() {
            return queryField;
        }

        public Get setQueryField(boolean queryField) {
            this.queryField = queryField;
            return this;
        }

        public String getQueryFields() {
            return queryFields;
        }

        public Get setQueryFields(String queryFields) {
            this.queryFields = queryFields;
            return this;
        }

    }

    public static class Del {
        @NotNull(message = "请传入id")
        private Long id;

        public Long getId() {
            return id;
        }

        public Del setId(Long id) {
            this.id = id;
            return this;
        }
    }


}